package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.PurchaseList;
import com.atguigu.jxc.entity.PurchaseListGoods;
import com.atguigu.jxc.to.PurchaseCountTo;
import com.atguigu.jxc.to.PurchaseTo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ClassName:PurchaseListDao
 * @Version: 1.0
 * @CreateAt:2021/3/8 10:43
 * @Author: ✨HanSan·胡✨
 * @Description:
 */
@Mapper
public interface PurchaseListDao {

    void save(PurchaseList purchaseList);

    void savePurchaseListGoods(@Param("list") List<PurchaseListGoods> list);

    List<Map> listByPage(PurchaseTo purchaseTo);

    List<PurchaseListGoods> goodsList(Integer purchaseListId);

    void deleteByPurchaseList(Integer purchaseListId);

    void deleteByPurchaseListGoods(Integer purchaseListId);

    void updateState(Integer purchaseListId);

    List<Map> count(PurchaseCountTo purchaseListId);
}
